package 公司真题.携程;

import java.util.Scanner;

public class _有几个1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long num = sc.nextLong();
        int res = howManyOne(num);
        System.out.println(res);
    }

    private static int howManyOne(long num) {
        int count = 0;
        while ((num | 0) != 0) {
            if ((num & 1) == 1) {
                count++;
            }
            num = num >> 1;
        }
        return count;
    }
}
